package com.example.myapp61.Util;

import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;

import com.example.myapp61.MainActivity;

public class AlertUtil_Test {
    private static AlertDialog alert;
    private static AlertDialog.Builder builder;
    public static void alert1(final Context context, String title, String msg){
        alert = null;
        builder = new AlertDialog.Builder(context);
        alert = builder.setTitle(title)
                .setMessage(msg)
                .setNegativeButton("取消", new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialogInterface, int i) {
                        ToasUtil.showMes(context,"点击了取消");
                    }
                })
                .setPositiveButton("确定", new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialogInterface, int i) {

                        ToasUtil.showMes(context,"点击了确定");
                    }
                }).create();
        alert.show();
    }

    public static void alsert2(Context context){

    }
}
